package com.liangtian.mdm.system.permission.model;

import com.liangtian.mdm.base.model.BaseModel;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "SYS_PERMISSION")
public class SysPermission extends BaseModel {
    @SequenceGenerator(name = "Any", sequenceName = "SYS_PERMISSION_SEQ")
    @Id
    @Column(name = "PERMISSION_ID")
    private long permissionId;//资源ID

    @Column(name = "PERMISSION_NAME")
    private String permissionName;//资源名称

    @Column(name = "PERMISSION_URL")
    private String permissionUrl;//资源URL

    @Column(name = "PERMISSION_FLAG")
    private Integer permissionFlag;//资源标识

    @Column(name = "PARENT_PERMISSION_ID")
    private Integer parentPermissionId;//父资源ID

    @Column(name = "PERMISSION_STATUS")
    private Integer permissionStatus;//资源状态

    @Column(name = "PERMISSION_CODE")
    private String permissionCode;//资源编码

    @Column(name = "PERMISSION_SECRUT_LEVEL")
    private Integer permissionSecrutLevel;//机密级别 默认0

    @Column(name = "CREATE_USER_ID")
    private long createUserId;//创建人

    @Column(name = "CREATE_DATE")
    private Date createDate;//创建时间

    @Column(name = "PERMISSION_REMARK")
    private String permissionRemark;//备注

    @Column(name = "PERMISSION_ICON")
    private String permissionIcon;//资源图标

    /**
     * @return PERMISSION_ID
     */
    public long getPermissionId() {
        return permissionId;
    }

    /**
     * @param permissionId
     */
    public void setPermissionId(long permissionId) {
        this.permissionId = permissionId;
    }

    /**
     * @return PERMISSION_NAME
     */
    public String getPermissionName() {
        return permissionName;
    }

    /**
     * @param permissionName
     */
    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName == null ? null : permissionName.trim();
    }

    /**
     * @return PERMISSION_URL
     */
    public String getPermissionUrl() {
        return permissionUrl;
    }

    /**
     * @param permissionUrl
     */
    public void setPermissionUrl(String permissionUrl) {
        this.permissionUrl = permissionUrl == null ? null : permissionUrl.trim();
    }

    /**
     * @return PERMISSION_FLAG
     */
    public Integer getPermissionFlag() {
        return permissionFlag;
    }

    /**
     * @param permissionFlag
     */
    public void setPermissionFlag(Integer permissionFlag) {
        this.permissionFlag = permissionFlag;
    }

    /**
     * @return PARENT_PERMISSION_ID
     */
    public Integer getParentPermissionId() {
        return parentPermissionId;
    }

    /**
     * @param parentPermissionId
     */
    public void setParentPermissionId(Integer parentPermissionId) {
        this.parentPermissionId = parentPermissionId;
    }

    /**
     * @return PERMISSION_STATUS
     */
    public Integer getPermissionStatus() {
        return permissionStatus;
    }

    /**
     * @param permissionStatus
     */
    public void setPermissionStatus(Integer permissionStatus) {
        this.permissionStatus = permissionStatus;
    }

    /**
     * @return PERMISSION_CODE
     */
    public String getPermissionCode() {
        return permissionCode;
    }

    /**
     * @param permissionCode
     */
    public void setPermissionCode(String permissionCode) {
        this.permissionCode = permissionCode == null ? null : permissionCode.trim();
    }

    /**
     * @return PERMISSION_SECRUT_LEVEL
     */
    public Integer getPermissionSecrutLevel() {
        return permissionSecrutLevel;
    }

    /**
     * @param permissionSecrutLevel
     */
    public void setPermissionSecrutLevel(Integer permissionSecrutLevel) {
        this.permissionSecrutLevel = permissionSecrutLevel;
    }

    /**
     * @return CREATE_USER_ID
     */
    public long getCreateUserId() {
        return createUserId;
    }

    /**
     * @param createUserId
     */
    public void setCreateUserId(long createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * @param date
     * @return CREATE_DATE
     */
    public Date getCreateDate(Date date) {
        return createDate;
    }

    /**
     * @param createDate
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * @return PERMISSION_REMARK
     */
    public String getPermissionRemark() {
        return permissionRemark;
    }

    /**
     * @param permissionRemark
     */
    public void setPermissionRemark(String permissionRemark) {
        this.permissionRemark = permissionRemark == null ? null : permissionRemark.trim();
    }

    /**
     * @return PERMISSION_ICON
     */
    public String getPermissionIcon() {
        return permissionIcon;
    }

    /**
     * @param permissionIcon
     */
    public void setPermissionIcon(String permissionIcon) {
        this.permissionIcon = permissionIcon == null ? null : permissionIcon.trim();
    }
}